package com.social.instadownloader.activity;

import android.graphics.Point;
import android.os.Build;
import android.os.Bundle;
import android.view.Display;
import android.widget.Toast;

public class MainActivity extends TabFragmentActivity{

	/** The screen width. */
	public static int SCREEN_WIDTH;
	
	/** The screen height. */
	public static int SCREEN_HEIGHT;
	
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		initScreenSize();
	}
	/**
	 * Inits the screen size.
	 */
	protected void initScreenSize(){
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
			Display display = getWindowManager().getDefaultDisplay();
			Point size = new Point();
			display.getSize(size);
			SCREEN_WIDTH = size.x;
			SCREEN_HEIGHT = size.y;
		} else {
			Display display = getWindowManager().getDefaultDisplay();
			SCREEN_WIDTH = display.getWidth();
			SCREEN_HEIGHT = display.getHeight();
		}
	}
	
	public void onDownloadSucess(String absolutePath){
		if(absolutePath!=null){
			Toast.makeText(this, "file downloaded :"+absolutePath, Toast.LENGTH_SHORT).show();
		}
	}
}
